package com.wing.product.model.response;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.wing.mybatis.common.BaseEntity;
import com.wing.product.model.entity.WarehouseStorageOrderDetail;
import com.wing.warehouse.model.entity.WarehouseFactoryShelfSpaceVO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.List;

@Schema(description="入库记录表")
@Data
@EqualsAndHashCode(callSuper=true)
@TableName(value = "warehouse_storage_order")
public class WarehouseStorageOrderVO extends BaseEntity<WarehouseStorageOrderVO> {

    @TableField(value = "storage_record_code")
    @Schema(description="入库作业编号")
    private String storageRecordCode;

    @TableField(value = "warehouse_factory_administration_id")
    @Schema(description="仓库ID")
    private Long warehouseFactoryAdministrationId;

    @TableField(value = "warehouse_product_id")
    @Schema(description="产品id 取 warehouse_product表")
    private Long warehouseProductId;

    @TableField(value = "warehouse_order_id")
    @Schema(description="托管订单ID")
    private Long warehouseOrderId;

    @TableField(value = "warehouse_factory_shelf_space_id")
    @Schema(description="库位ID")
    private Long warehouseFactoryShelfSpaceId;

    @TableField(value = "Sign_in_record_id")
    @Schema(description="签收记录ID")
    private Long signInRecordId;

    @TableField(value = "Inventory_quantity")
    @Schema(description="入库数量")
    private String inventoryQuantity;

    @Schema(description="入库仓库")
    private String warehouseFactoryAdministrationName;

    @Schema(description="入库库位")
    private String warehouseFactoryShelfSpaceName;

    @Schema(description="托管订单编号")
    private String warehouseOrderCode;

    @Schema(description="产品编号SKU")
    private String productCode;

    @Schema(description="产品类型")
    private String warehouseProductType;

    @Schema(description="单位")
    private String unit;

    @Schema(description="客户")
    private String userName;

    @Schema(description="规格码")
    private String productSpecCode;

    @Schema(description="品种")
    private String productVarietyName;

    @Schema(description="牌号")
    private String productMarkName;

    @Schema(description="客户")
    private String warehouseCustomerId;

    @Schema(description="所属签收记录编号")
    private String signCode;

    @Schema(description="运单编号")
    private String waybill;

    @Schema(description="净重")
    private Double netWeight;

    @Schema(description="毛重")
    private Double grossWeight;

    @Schema(description="质检记录id")
    private Long qualityTestingId;

    @Schema(description="质检记录编号")
    private String qualityTestingCode;

    @Schema(description="报工记录编号")
    private String processingReportCode;

    @Schema(description="制令单编号")
    private String schedulingPlanDetailCode;

    private String shipmentOrderCode;
    private String orderCode;
    private String status;

    @Schema(description="生产计划编号")
    private String productionPlanCode;

    @Schema(description="制造令编号")
    private String productionPlanDetailCode;

    private List<WarehouseStorageOrderDetailVO> warehouseStorageOrderDetailList;


    // 来自 warehouse_product_inventory 表
    private String userBundleCode;  // a.user_bundle_code
    private String customerId;     // a.customer_id
    private String specifications; // a.specifications

    // 来自 warehouse_contract 表
    private String contractCode;   // c.contract_code

    // 来自 pro_product_mark 表 (别名为 productMark)
    private String productMark;    // d.mark_name as productMark

    // 来自 pro_product_producer 表 (别名为 productProducer)
    private String productProducer; // e.producer_name as productProducer

    // 来自 pro_product_variety 表 (别名为 productVariety)
    private String productVariety;  // f.variety_name as productVariety

    // 来自 sel_customers_info 表
    private String customerName;   // g.customer_name

    private String inventoryId;

    private String inventoryTypeName;    // e.NAME as inventoryTypeName
    private Long productId;              // d.id as productId
    private String unitName;             // g.NAME unitName
    private String factoryName;


    // 新增的属性

    private Long warehouseStorageOrderId;  // a.warehouse_storage_order_id
    private String warehouseTypeName;      // i.name as warehouseTypeName

    private List<WarehouseFactoryShelfSpaceVO> warehouseFactoryShelfSpaceVOList;

}
